<?php
/**
 * 中心首页
 * @author liuzilu <fotomxq@gmail.com>
 * @version 1
 * @package center
 */
//引用全局
require('glob.php');
?>

<!DOCTYPE html>
<html lang="zh-cn" dir="ltr">

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>中心 - <?php echo $webData['WEB-TITLE']; ?></title>
        <link rel="shortcut icon" href="../assets/imgs/logo.ico" type="image/x-icon">
        <link rel="apple-touch-icon-precomposed" href="../assets/imgs/logo.png">
        <link rel="stylesheet" href="../assets/css/uikit.min.css">
        <link rel="stylesheet" href="../assets/css/components/notify.min.css">
        <link rel="stylesheet" href="assets/css/index.css">
    </head>

    <body>

        <div class="uk-container uk-container-center uk-margin-top uk-margin-large-bottom">

        <?php require('page-menu.php'); ?>

            <div class="uk-grid" data-uk-grid-margin>
                <div class="uk-width-1-1">
                    <h1 class="uk-heading-large">应用中心</h1>
                    <p class="uk-text-large">选择进入下面的应用，开始使用。</p>
                </div>
            </div>

            <div class="uk-grid" data-uk-grid-margin>
                <div class="uk-width-1-1">
                    <ul id="app-list" class="uk-switcher">
                        <?php
                        $rowNum = 0;
                        foreach ($appList as $k => $v) {
                            $rowNum += 1;
                            if ($rowNum === 1) {
                                echo '<li class="uk-active"><div class="uk-grid" data-uk-grid-margin>';
                            }
                            ?>
                            <div class="uk-width-medium-1-3">
                                <div class="uk-thumbnail uk-overlay-hover">
                                    <figure class="uk-overlay">
                                        <img width="600" height="400" src="../<?php echo $v['name']; ?>/assets/img/app-logo.png" alt="<?php echo $v['title']; ?>">
                                        <figcaption class="uk-overlay-panel uk-overlay-icon uk-overlay-background uk-overlay-fade"><?php echo $v['des']; ?></figcaption>
                                        <a class="uk-position-cover" href="../<?php echo $v['name']; ?>/index.php"></a>
                                    </figure>
                                </div>
                            </div>
                            <?php
                            if ($rowNum === 3) {
                                echo '</div></li>';
                                $rowNum = 0;
                            }
                        }
                        ?>
                    </ul>
                </div>
            </div>
        </div>

        <script src="../assets/js/jquery.min.js"></script>
        <script src="../assets/js/uikit.min.js"></script>
        <script src="../assets/js/components/notify.min.js"></script>

    </body>
</html>